<template>
    <h1>支付测试</h1>
    <div>

        <!-- 订单编号：<input type="text" v-model="orderId"/>
       <br />
       订单金额：<input type="text" v-model="money" />
       
       <input type="button" value="支付" @click="payFn" />
       -->
        <form action="http://localhost/pay" method="get">
            订单编号：<input type="text" name="orderId" value="111111222223344co"  />
            <br />
            订单金额：<input type="text" name="money" value="10" />
            <input type="hidden" name="return_url" value="http://127.0.0.1:8099/MyHooks" />
            <input type="submit" value="支付" />
        </form>
    </div>
</template>
 
<script>
import axios from "axios";

export default {
    name: "MyMy",
    data() {
        return {
            orderId: "111111222223344cc",
            money: 0
        }
    },
    methods: {
        payFn() {
            axios({
                url: "/apipay/pay",
                params: {
                    orderid: this.orderId,
                    money: this.money,
                    return_url: "http://127.0.0.1:8099/MyHooks"
                }
            }).then(res => {
                console.log("成功！");
                console.log("res.data", res.data);
            })
        }
    }
}
</script>
 
<style scoped></style>